package com.tcp;


import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

/**
 * @Author weijingchen
 * @Date 2025/6/26 7:33
 * @Version 1.0.0
 */
public class TcpClient {
    public static void main(String[] args) throws IOException {
        Socket socket = new Socket("127.0.0.1" ,10010);

        OutputStream outputStream = socket.getOutputStream();
        outputStream.write("你好".getBytes());
        outputStream.flush();
        socket.close();
        System.out.println("发送成功");
    }
}
